﻿using System;
using SystemX.Infrastructure;

namespace SystemX.Web.Infrastructure{
    [Serializable]
    public class JQModalData:ResponseBase<JQModalData>
    {
		/// <summary>
		/// Current response is an alert
		/// </summary>
		public bool IsAlert { get; set; }
		public override JQModalData Load(BOMessager msg)
		{
			base.Load(msg);
			if (IsAlert) {
				Body = null;
                Title = string.IsNullOrEmpty(msg.Body) ? Utils.Translate("App.ProcessDone", "数据处理成功") : msg.Body;
			}
			return this;
		}
		public JQModalData Alert(BOMessager msg) {
			IsAlert = true;
			Load(msg);
			return this;
		}
    }
}
